]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
main: grab the keyboard D-Bus interface at startup
authorDan Winship <danw@gnome.org>
Fri, 2 Sep 2011 15:28:47 +0000 (11:28 -0400)
committerDan Winship <danw@gnome.org>
Fri, 2 Sep 2011 15:41:02 +0000 (11:41 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=658065

js/ui/keyboard.js
src/main.c

index e6d56b7cec045e766dd07f071a7f42d127741adf..7742788b94680e2e23bb064ad09fa188d90cc333 100644 (file)
@@ -199,7 +199,6 @@ function Keyboard() {
 Keyboard.prototype = {
     _init: function () {
         DBus.session.exportObject('/org/gnome/Caribou/Keyboard', this);
-        DBus.session.acquire_name('org.gnome.Caribou.Keyboard', 0, null, null);
 
         this._timestamp = global.get_current_time();
         this.actor = new St.BoxLayout({ name: 'keyboard', vertical: true, reactive: true });
index 23c33a52adc6d954bbad2a043b77e8878e872aaf..7c68799e65c2ddfeee3ac252d015f2aba6a5244f 100644 (file)
@@ -117,6 +117,17 @@ shell_dbus_init (gboolean replace)
       g_print ("failed to acquire org.freedesktop.Notifications: %s\n", error->message);
     }
 
+  /* ...and the on-screen keyboard service */
+  if (!dbus_g_proxy_call (bus, "RequestName", &error,
+                          G_TYPE_STRING, "org.gnome.Caribou.Keyboard",
+                          G_TYPE_UINT, DBUS_NAME_FLAG_REPLACE_EXISTING | request_name_flags,
+                          G_TYPE_INVALID,
+                          G_TYPE_UINT, &request_name_result,
+                          G_TYPE_INVALID))
+    {
+      g_print ("failed to acquire org.freedesktop.Notifications: %s\n", error->message);
+    }
+
   g_object_unref (bus);
 }